package com.cloudfun.campusshare.common.model.dto.kjt;

import com.cloudfun.campusshare.common.constant.BankType;
import com.cloudfun.campusshare.common.constant.SettleType;
import com.cloudfun.campusshare.common.constant.ShopType;
import com.kjtpay.gateway.common.enums.SubMerchantType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.List;

/**
 * Created by Huqin on 2020/8/10
 */
@Data
@ApiModel("快捷通子商户创建DTO")
public class KjtSubMerchantCreateDTO {

    private String id;

    @ApiModelProperty("子商户类型")
    @NotNull(message = "子商户类型不能为空")
    private SubMerchantType customerType;

    @ApiModelProperty("企业、个体工商户法人/个人商家姓名")
    @NotEmpty(message = "法人、商家姓名不能为空")
    @Length(min = 2, max = 32, message = "法人姓名限制2-32个字符")
    private String name;

    @ApiModelProperty("企业、个体工商户法人/个人商家证件号码(身份证)")
    @NotEmpty(message = "法人身份证不能为空")
    @Length(min = 1, max = 50, message = "身份证限制1-50个字符")
    private String certificatesNumber;

    @ApiModelProperty("企业、个体工商户法人/个人商家身份证有效期")
    private LocalDate certificatesValidity;

    @ApiModelProperty("企业、个体工商户/个人商家所属省份")
    @NotEmpty(message = "所属省份不能为空")
    @Length(min = 1, max = 32, message = "所属省份限制1-32个字符")
    private String province;

    @ApiModelProperty("企业、个体工商户/个人商家所属地市")
    @NotEmpty(message = "所属地市不能为空")
    @Length(min = 1, max = 32, message = "所属地市限制1-32个字符")
    private String city;

    @ApiModelProperty("企业、个体工商户/个人商家所属区县")
    @NotEmpty(message = "所属区县不能为空")
    @Length(min = 1, max = 64, message = "所属区县限制1-64个字符")
    private String area;

    @ApiModelProperty("企业、个体工商户/个人商家详细地址")
    @NotEmpty(message = "详细地址不能为空")
    @Length(min = 6, max = 256, message = "详细地址限制6-256个字符")
    private String address;

    @ApiModelProperty("企业、个体工商户/个人商家联系人姓名")
    @NotEmpty(message = "联系人姓名不能为空")
    @Length(min = 1, max = 11, message = "联系人姓名限制1-11个字符")
    private String contactName;

    @ApiModelProperty("联系人手机号")
    @NotEmpty(message = "联系人手机号不能为空")
    @Length(min = 1, max = 11, message = "联系人手机号限制1-11个字符")
    private String phoneNum;

    @ApiModelProperty("联系人邮箱")
    @NotEmpty(message = "联系人邮箱不能为空")
    @Length(min = 6, max = 50, message = "联系人邮箱限制6-50个字符")
    private String email;

    @ApiModelProperty("银行卡类别")
    @NotNull(message = "银行卡类别不能为空")
    private BankType companyOrPerson;

    @ApiModelProperty("结算银行卡号")
    @NotEmpty(message = "结算银行卡号不能为空")
    @Length(min = 6, max = 32, message = "联系人手机号限制6-32个字符")
    private String bankCardNo;

    @ApiModelProperty("银行卡户名")
    @NotEmpty(message = "银行卡户名不能为空")
    @Length(min = 2, max = 32, message = "银行卡户名限制2-32个字符")
    private String bankAccountName;

    @ApiModelProperty("开户银行编码")
    @NotEmpty(message = "开户银行编码不能为空")
    @Length(min = 2, max = 16, message = "开户银行编码限制2-16个字符")
    private String bankCode;

    @ApiModelProperty("开户行名称")
    @NotEmpty(message = "开户行名称不能为空")
    @Length(min = 2, max = 16, message = "开户行名称限制2-16个字符")
    private String bankName;

    @ApiModelProperty("开户行省份")
    @NotEmpty(message = "开户行省份不能为空")
    @Length(min = 2, max = 16, message = "开户行省份限制2-16个字符")
    private String bankProv;

    @ApiModelProperty("开户行城市")
    @NotEmpty(message = "开户行城市不能为空")
    @Length(min = 2, max = 32, message = "开户行城市限制2-32个字符")
    private String bankCity;

    @ApiModelProperty("开户银行支行名称")
    @NotEmpty(message = "开户银行支行名称不能为空")
    @Length(min = 2, max = 128, message = "开户银行支行名称限制2-128个字符")
    private String bankBranchName;

    @ApiModelProperty("商户店面类型")
    @NotNull(message = "商户店面类型不能为空")
    private ShopType shopType;

    @ApiModelProperty("身份证正面")
    @NotEmpty(message = "身份证正面不能为空")
    @Length(min = 1, max = 40, message = "身份证正面限制1-40个字符")
    private String certificatesFrontId;

    @ApiModelProperty("身份证反面")
    @NotEmpty(message = "身份证反面不能为空")
    @Length(min = 1, max = 40, message = "身份证反面限制1-40个字符")
    private String certificatesBackId;

    @ApiModelProperty("网店完整的域名截图照片")
    @Length(min = 1, max = 40, message = "网店完整的域名截图照片限制1-40个字符")
    private String networkUrlPhotoId;

    @ApiModelProperty("商户经营场所照片，至少三张")
    private List<String> storeIds;

    @ApiModelProperty("商户经营场所租赁合同或办公场所产权证明照片")
    private List<String> businessLeaseContractIds;

    @ApiModelProperty("营业执照影印件")
    @NotEmpty(message = "营业执照影印件不能为空")
    @Length(min = 1, max = 40, message = "营业执照影印件限制1-40个字符")
    private String licenseId;

    @ApiModelProperty("开户许可证影印件")
    @NotEmpty(message = "开户许可证影印件不能为空")
    @Length(min = 1, max = 40, message = "开户许可证影印件限制1-40个字符")
    private String openLicenseId;

    @ApiModelProperty("组织机构代码证影印件")
    @Length(min = 1, max = 40, message = "组织机构代码证影印件限制1-40个字符")
    private String organizationNumberId;

    @ApiModelProperty("税务登记影印件")
    @Length(min = 1, max = 40, message = "税务登记影印件限制1-40个字符")
    private String taxId;

    @ApiModelProperty("结算方式")
    @NotNull(message = "结算方式不能为空")
    private SettleType settleType;

    @ApiModelProperty("委托提现起结金额")
    @Length(min = 1, max = 15, message = "委托提现起结金额限制1-30个字符")
    private String entrustWithdrawalAmount;

    @ApiModelProperty("商户名称")
    @NotEmpty(message = "商户名称不能为空")
    @Length(min = 1, max = 100, message = "商户名称限制1-100个字符")
    private String companyName;

    @ApiModelProperty("营业执照号")
    @NotEmpty(message = "营业执照号不能为空")
    @Length(min = 1, max = 30, message = "营业执照号限制1-30个字符")
    private String businessLicenseNo;

    @ApiModelProperty("营业执照有效期")
    private LocalDate businessLicenseValidity;

    @ApiModelProperty("是否三证合一")
    @NotNull(message = "是否三证合一不能为空")
    private Boolean threeCertFlag;

    @ApiModelProperty("组织机构代码证号")
    @Length(min = 1, max = 30, message = "组织机构代码证号限制1-30个字符")
    private String organizationCode;

    @ApiModelProperty("税务登记证号")
    @Length(min = 1, max = 30, message = "税务登记证号限制1-30个字符")
    private String taxRegistryNo;
}
